CFLAG= -std=c++17 -I ../../common/muduobase/include
LFLAG= -L ../../common/muduobase/lib -lmuduo_net -lmuduo_base -pthread -ljsoncpp

all:publish_client subscribe_client topic_server
publish_client:publish_client.cc
	g++ -o $@ $^  $(CFLAG) $(LFLAG)
subscribe_client:subscribe_client.cc
	g++ -o $@ $^  $(CFLAG) $(LFLAG)
topic_server:topic_server.cc
	g++ -o $@ $^  $(CFLAG) $(LFLAG)
.PHONY:debug
debug:publish_client_g subscribe_client_g topic_server_g
publish_client_g:publish_client.cc 
	g++ -o $@ $^  $(CFLAG) $(LFLAG) -g
subscribe_client_g:subscribe_client.cc
	g++ -o $@ $^  $(CFLAG) $(LFLAG) -g
topic_server_g:topic_server.cc
	g++ -o $@ $^  $(CFLAG) $(LFLAG) -g

.PHONY:clean
clean: 
	rm -rf publish_client subscribe_client topic_server_g subscribe_client_g publish_client_g topic_server